<template>
  <div>
    <!-- 路由缓存 -->
    <keep-alive include="search">
      <!-- 路由出口 -->
      <router-view></router-view>
    </keep-alive>
    <!-- 路由元信息实现登录页底隐藏导航栏：v-if="$route.meta.showTab" -->
    <van-tabbar v-model="active" route placeholder v-if="$route.meta.showTab">
      <van-tabbar-item to="/home" icon="home-o">首页</van-tabbar-item>
      <van-tabbar-item to="/qa" icon="chat-o">问答</van-tabbar-item>
      <van-tabbar-item to="/movie" icon="video-o">视频</van-tabbar-item>
      <van-tabbar-item to="/user" icon="user-o">用户</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data () {
    return {
      active: 0
    }
  }
}
</script>

<style>
.box {
  width: 37.5px;
  height: 37.5px;
  background-color: green;
}
</style>
